<div class="layui-card">
    <div class="layui-card-header">
        <h2>编辑用户</h2>
    </div>
    <div class="layui-card-body">
        <form class="layui-form" action="<?php echo \yii\helpers\Url::to(['edit','id'=>$model->id])?>" method="post">
            <div class="layui-form-item">
                <label for="" class="layui-form-label">用户名</label>
                <div class="layui-input-inline">
                    <input type="text" name="username" value="<?php echo $model->username; ?>" placeholder="请输入用户名"  class="layui-input">
                </div>
                <div class="layui-word-aux layui-form-mid"><?php echo $model->getFirstError('username'); ?></div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">邮箱</label>
                <div class="layui-input-inline">
                    <input type="email" name="email" value="<?php echo $model->email; ?>" placeholder="请输入邮箱"  class="layui-input">
                </div>
                <div class="layui-word-aux layui-form-mid"><?php echo $model->getFirstError('email'); ?></div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn">确认</button>
                    <a href="<?php echo \yii\helpers\Url::to(['index']); ?>" class="layui-btn layui-btn-primary">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>


<?php

$js = <<<JS
    layui.use(['form','element','table', 'layer'],function() {
        var form = layui.form;  
        var element = layui.element;  
        var table = layui.table;  
        var layer = layui.layer;  
        
    });
JS;
$this->registerJs($js);
